using System;

namespace RotateImage
{
    public class Solution
    {
        public void Rotate(int[,] matrix)
        {
            var len = matrix.GetLength(0);

            var rotateMatrix = new int[len, len];

            for (var i = 0; i < len; i++)
            for (var j = len - 1; j >= 0; j--)
                rotateMatrix[i, len - 1 - j] = matrix[j, i];

            Array.Copy(rotateMatrix, matrix, len * len);
            //matrix = rotateMatrix;
        }
    }
}